<template>
  <div>
    <div class="corporation_name">
      <div>
        <div class="enterprise_icon" :style="{ background: color }">
          {{ delAll.jkJbxxSfxx.shortName }}
        </div>
      </div>
      <div class="corporation_text">{{ delAll.jkJbxxSfxx.d2CorpName }}</div>
    </div>
    <div class="quota_box">
      <div class="quota_box_one">
        <img src="~img/lookAround/ceicon.png" alt="" />
      </div>
      <div class="quota_box_two">征信预授信额度</div>
      <div class="quota_box_three">
        <div class="quota_box_threeNum">{{ limit }}</div>
        <div class="wy">元</div>
      </div>
    </div>
    <div class="tips">
      提示:本次测算结果是依据该企业当前经营等多维度数据通过额度测算模型得出，所测算额度仅供参考，不代表银行实际授信额度，不做任何证明。
    </div>
  </div>
</template>
<script>
import { limit, subscribeCompany } from "@/interfaces/lookAround/index.js";
export default {
  name: "",
  /*1. Vue扩展 */
  extends: "", // extends和mixins都扩展逻辑，需要重点放前面
  mixins: [],
  components: {},
  /* 2. Vue数据 */
  props: {},
  model: { prop: "", event: "" }, // model 会使用到 props
  data() {
    return {
      corpKey: "",
      latitude: "",
      longitude: "",
      distance: "",
      limit: "",
      color: "",
      delAll: {},
    };
  },
  computed: {},
  watch: {}, // watch 监控的是 props 和 data，有必要时监控computed
  /* 3. Vue资源 */
  filters: {},
  directives: {},
  /* 4. Vue生命周期 */
  created() {
    this.delAll = JSON.parse(this.$route.query.delAll);
    this.corpKey = this.$route.query.corpKey;
    this.color = this.$route.query.color;
    console.log(this.color);
    this.getLimit();
  },
  mounted() {},
  destroy() {},
  /* 5. Vue方法 */
  methods: {
    async getLimit() {
      let params = {
        corpKey: this.corpKey,
      };

      const res = await limit({ ...params });

      this.limit = res.data.limit;
    },
  }, // all the methods should be put here in the last
};
</script>
<style lang="scss" scoped>
.enterprise_icon {
  width: 38px;
  height: 37px;
  line-height: 15px;
  padding: 4px 1px 1px 0;
  background-color: #d99d9a;
  font-size: 13px;
  color: white;
  text-align: center;
  border-radius: 5px;
  margin-top: 5px;
  // height: fit-content;
}
.corporation_name {
  display: flex;
  padding: 10px;
}
.corporation_text {
  font-size: 17.33px;
  color: #000000;
  font-family: "PuHuiTi65";
  margin-left: 10px;
}
.quota_box {
  width: 319px;
  height: 220px;
  margin: auto;
  // height: 230px;
  margin-top: 20px;
  background-image: url("~img/lookAround/frame_back.png");
  background-size: 100% 100%;
  text-align: center;
  overflow: hidden;
}
.quota_box_one {
  margin-top: 30px;
  img{
    width: 78.3px;
  }
}
.quota_box_two {
  margin-top: 9px;
  font-size: 14.67px;
}
.quota_box_three {
  // margin-top: 10px;
  display: flex;
  justify-content: center;
  margin-top: -5px;
}
.quota_box_threeNum {
  font-size: 37px;
  max-width: 280px;
  font-weight: bold;
  font-family: YouSheBiaoTiHei;
  word-wrap: break-word;
  // letter-spacing: 5px;
}
.wy {
  font-size: 14px;
  line-height: 57px;
  margin-left: 5px;
}
.tips {
  margin-top: 20px;
  padding: 0 10px;
  font-size: 13.3px;
  line-height: 25px;
  text-align: justify;
  color: #989898;
}
</style>
